<script setup lang='ts'>
import { useCounterStore } from '@/stores/counter';

const counter = useCounterStore()

</script>

<template>
    <div style="border: 5px solid red; width:200px; height:200px">
        组件A
        <div>数量：{{ counter.count }}</div>
        <div>双倍数量：{{ counter.doubleCount }}</div>
        <button @click="counter.add()">加1</button>
        <button @click="counter.cut()">减1</button>
    </div>
</template>

<style scoped></style>